//
//  Fraction.h
//  02-FracHomeWork
//
//  Created by 曹曹 on 16/7/5.
//  Copyright © 2016年 曹曹. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Fraction : NSObject
@property (nonatomic, assign) NSInteger numerator;
@property (nonatomic, assign) NSInteger demoninator;
/** 初始化一个分数 */
- (instancetype)initWithNumerator:(NSInteger)nume denominator:(NSInteger)denom;
/** 构造一个分数 */
+ (instancetype)fractionWithNumerator:(NSInteger)nume denominator:(NSInteger)denom;
/** 分数相加 */
- (Fraction *)plusWithFraction:(Fraction *)frac;
/** 分数相减 */
- (Fraction *)decreaseWithFraction:(Fraction *)frac;
/** 分数相乘 */
- (Fraction *)multipleWithFraction:(Fraction *)frac;
/** 分数相除 */
- (Fraction *)divideWithFraction:(Fraction *)frac;
/** 分数约分 */
- (Fraction *)reduction;
/** 分数比较大小 */
- (void)compareWithFraction:(Fraction *)frac;
@end
